#data {
#for (i in 1:N) {
#	dif_var1[i]<-(1/dif_var[i])
#	dif_est[i]~dnorm(dif[i], dif_var1[i])
#	}
#}

model {
for (i in 1:N) {
	xbeta[i]<-a[id[i]]+dif[i]*b[1]+conflict[i]*b[2]+
		t[i]*b[3]
	
	logit(pr[i])<-xbeta[i]
	iacrt[i]~dbern(pr[i])
	}

for (i in 1:29) {
	a[i]~dnorm(mu.a[i], tau)
	mu.a[i]<-g[1]+common[i]*g[2]
	}

for (k in 1:3) {
	b[k]~dnorm(0,.1)
	}

for (j in 1:2) {
	g[j]~dnorm(0,.1)
	}

tau~dgamma(.1, 1)

}

